package gtkwire.widget;

import gtkwire.*;

/**
*The base class of widgets that can be added to GtkToolbar. To create a toolbar item 
*that contain something else than a button, use GtkContainer.add() to add widget.
*/
public class GtkToolItem extends GtkBin
{
	public GtkToolItem()
	{
		super();
		widgetType = WT_GtkToolItem;
		gtkCreate();
	}

	public GtkToolItem( String name, GladeKey key )
	{
		super( name, key );
		widgetType = WT_GtkToolItem;
	}

	/**
	*Sets whether tool item is to be allocated the same size as other homogeneous items. 
	*The effect is that all homogeneous items will have the same width as the widest of the items.
	*/
	public void setHomogenous( boolean value )
	{
		app().sendCommand( name, GTKWireCommand.SET_HOMOGENOUS, value );
	}

	/**
	*Sets whether tool item is allocated extra space when there is more 
	*room on the toolbar then needed for the items.
	*The effect is that the item gets bigger when the toolbar gets 
	*bigger and smaller when the toolbar gets smaller.
	*/
	public void setExpand( boolean value )
	{
		app().sendCommand( name, GTKWireCommand.SET_EXPAND, value );
	}

	/**
	*Sets the text to be displayed as tooltip on the item. 
	*/
	public void setTooltip( String text )
	{
		app().sendCommand( name, GTKWireCommand.SET_TOOLTIP, text );
	}


/*
void                gtk_tool_item_set_is_important      (GtkToolItem *tool_item,
                                                         gboolean is_important);

void                gtk_tool_item_set_proxy_menu_item   (GtkToolItem *tool_item,
                                                         const gchar *menu_item_id,
                                                         GtkWidget *menu_item);
*/

}//end class